package test;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class RepeatedWord {
	
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		String str = sc.nextLine();
		
		String[] word = str.split(" +");
		List<String> list = new ArrayList<String>();
		for (int i = 0; i < word.length; i++) {
			
			if (!list.contains(word[i])) {
				list.add(word[i]);
			}
		}
		
		System.out.println(list.size());
		
		sc.close();
	}
}
